<!--
    msg = {"1": {"peak": {"alarm": [0,1,0,1,0,1], "value": [1,2,5,4,3,6], "unit": "mv"},"datetime": "2018-03-16 09:57:59"}};
    return render(request, "history.html",{"history_data": json.dumps(msg)});
-->
<!DOCTYPE html>
<html lang="en">
<head>

    {% load staticfiles %}
    <meta charset="UTF-8">
    <title>历史记录</title>
    <script type="text/javascript">
             history_data = {{ history_data|safe }};
    </script>
    <script src="../../static/js/jquery.js"></script>
    <script src="../../static/js/Calendar.js"></script>
	<!-- <script src="../../static/js/echarts.min.js"></script> -->
    <script src="../../static/js/ThunderURIEncode.min.js"></script>
	<script src="../../static/js/proj-function.min.js"></script>
    <script src="../../static/js/heard-mutilctrl.min.js"></script>
    <script src="../../static/js/history-mutilctrl.js"></script>    
	<link rel="stylesheet" type="text/css" href="../../static/css/all-set.css">
</head>

<body>
<div class="public">
	<div class="public_heard">
		<a id="link_to_device" href="/index/get_latest_monitor_data/?page_id=1&page_rows=20">设备监控</a>
        <!-- <a id="link_to_alarm" href='/index/get_alarm_list/?device_node_id=1&rows=20&start=now'>报警查询</a> -->
        <a id="link_to_history" href='/index/get_history_records/?device_node_id=1&rows=20'>历史数据</a>
        <a id="link_to_setting" href='#'>系统设置</a>
        <!-- <a id="link_to_user_setting" href="#">用户设置</a> -->
	</div>
<div  class="public_body">
	<div style="width: 1200px; text-align: center;font-size: 20px;"><label id="history_title">设备历史记录</label></div>
	<div class="public_table">
    <table id="history_table">
        <thead>           
            <th id="history_table_th_date" style="width: 250px;" >
            <div style="text-align: right;"><span style="text-decoration:underline;">日期</span>
            <span id="history_table_serach" style="visibility: visible;">
             <input type="text" id="input_serach_data" style="width: 70px;" onclick="fPopCalendar(event,this,this)"><button id="button_serach_data" onclick="onSerachData(input_serach_data);">查询</button>
            </span>
            </div>
            </th>                        
            <th>文件</th>
            <th style="width: 200px;"><button onclick="onDownLoadAll()">打包下载</button> </th>
        </thead>
        <tbody id="history_table_tbody">      
        <tr class="item_list">         
            <td>"2012-12-12"</td>
            <td>"F:/data/test.bin"</td>
            <td>
                <!-- <a href="/api/download_file/?file_path=F:\AcqCloud\2018-5-9\test\testjango\upload\1\2018_0509_17\maple-ch02.pdf">下载</a> -->
                <a class="history_link_download" href="#">下载</a>
                <!-- <button class="button_download">下载</button> -->
            </td>
        </tr> 
        </tbody>     
    </table>
    </div>
   
    <div class="from_paging">
        <button class="btn" id="prev_page" onclick="pageClick(1)">上一页</button>
        <!-- 第<span id="current_page">{{ page_id }}</span>页 -->
        <button class="btn" id="next_page" onclick="pageClick(2)">下一页</button>
    </div>
  

</div>
</div>
</body>
</html>